package it.avantsoft.ls.peer.command;

import it.avantsoft.ls.peer.PeerHandler;

public class HorizontalBalanceCommand extends PeerCommand {
    private int loadDifference;
    private String designedGroupLeaderId;

    public HorizontalBalanceCommand(PeerHandler peerHandler, int loadDifference, String designedGroupLeaderId) {
        super(peerHandler);
        this.loadDifference = loadDifference;
        this.designedGroupLeaderId = designedGroupLeaderId;
    }

    public void execute() {
        //TODO implements execute
        getPeer().horizontalBalance(loadDifference, designedGroupLeaderId);
    }

    public String toString() {
        return "HorizontalBalanceCommand{" +
                "loadDifference=" + loadDifference +
                ", designedGroupLeaderId='" + designedGroupLeaderId + '\'' +
                '}';
    }
}
